// This file was decompiled using SASCM.ini published by GTAG (http://gtag.gtagaming.com/opcode-database) on 14.6.2013
{$CLEO .cs}

//-------------MAIN---------------
0000: NOP 
thread 'AIRU' 
wait 0 
0209: 31@ = random_int_in_ranges 1 3 
if 
  31@ == 3 
jf @AIRU_33 
31@ = 1 

:AIRU_33
if 
  31@ == 1 
jf @AIRU_72C 
Model.Load(#CARGOBOB)
Model.Load(#ARMY)
Model.Load(#MP5LNG)
038B: load_requested_models 
9@ = 0 

:AIRU_5D
wait 0 

:AIRU_61
wait 0 
if 
   Player.Defined(0)
jf @AIRU_61 
09E8: $GYMFIGHT_INTERIOR = actor $PLAYER_ACTOR active_interior 
if 
  $GYMFIGHT_INTERIOR == 0 
jf @AIRU_725 
if 
  9@ == 0 
jf @AIRU_1C7 

:AIRU_A0
wait 0 
04C4: store_coords_to 11@ 12@ 13@ from_actor $PLAYER_ACTOR with_offset 100.0 100.0 100.0 
04C4: store_coords_to 14@ 15@ 16@ from_actor $PLAYER_ACTOR with_offset -100.0 -100.0 0.0 
0208: 17@ = random_float_in_ranges 11@ 14@ 
0208: 18@ = random_float_in_ranges 12@ 15@ 
0087: 19@ = 13@ // (float) 
if 
00C2:   sphere_onscreen 17@ 18@ 19@ radius 5.0 
jf @AIRU_122 
wait 0 
jump @AIRU_A0 

:AIRU_122
30@ = Car.Create(#CARGOBOB, 17@, 18@, 19@)
Car.Health(30@) = 15000
29@ = Actor.CreateAsDriver(Cop, #ARMY, 30@)
039F: set_car 30@ race_to 1@ 2@ 
5@ = Marker.CreateAboveCar(30@)
0825: set_helicopter 30@ instant_rotor_start 
07BB: set_heli 30@ horizontal_thrust_power 6 
04C4: store_coords_to 0@ 1@ 2@ from_actor $PLAYER_ACTOR with_offset 0.0 -10.0 0.0 
04A2: set_heli 30@ fly_to 0@ 1@ 2@ altitude_between 10.0 and 10.0 
04DF: set_heli 30@ lean_and_thrust_limiter 0 
0564: heli 30@ simulate_crash_landing 
07BB: set_heli 30@ horizontal_thrust_power 10 
Car.SetMaxSpeed(30@, 70.0)
07BB: set_heli 30@ horizontal_thrust_power 6 
9@ = 1 

:AIRU_1C7
if 
  9@ == 1 
jf @AIRU_522 
if 
056E:   car 30@ defined 
jf @AIRU_522 
04C4: store_coords_to 0@ 1@ 2@ from_actor $PLAYER_ACTOR with_offset 0.0 10.0 0.0 
04A2: set_heli 30@ fly_to 0@ 1@ 2@ altitude_between 10.0 and 10.0 
Car.LockInCurrentPosition(30@) = False
07BB: set_heli 30@ horizontal_thrust_power 6 
if 
0202:   actor $PLAYER_ACTOR near_car 30@ radius 25.0 25.0 sphere 0 
jf @AIRU_522 
wait 500 
Car.SetMaxSpeed(30@, 70.0)
Car.SetSpeedInstantly(30@, 5.0)
04C4: store_coords_to 0@ 1@ 2@ from_actor $PLAYER_ACTOR with_offset 0.0 0.0 20.0 
04A2: set_heli 30@ fly_to 0@ 1@ 2@ altitude_between 20.0 and 20.0 

:AIRU_299
wait 0 
if 
056D:   actor 29@ defined 
jf @AIRU_66E 
if 
   not Actor.Dead(29@)
jf @AIRU_66E 
0104:   actor $PLAYER_ACTOR near_actor 29@ radius 80.0 80.0 20.0 sphere 0 
jf @AIRU_299 
Car.LockInCurrentPosition(30@) = True
0407: store_coords_to 16@ 17@ 18@ from_car 30@ with_offset 1.9 1.3 -2.1 
0503: create_actor_on_rope_with_pedtype 6 model #ARMY at 16@ 17@ 18@ handle_as 20@ 
0407: store_coords_to 16@ 17@ 18@ from_car 30@ with_offset 1.9 -0.8 -2.1 
0503: create_actor_on_rope_with_pedtype 6 model #ARMY at 16@ 17@ 18@ handle_as 21@ 
0407: store_coords_to 16@ 17@ 18@ from_car 30@ with_offset -1.9 1.3 -2.1 
0503: create_actor_on_rope_with_pedtype 6 model #ARMY at 16@ 17@ 18@ handle_as 23@ 
0407: store_coords_to 16@ 17@ 18@ from_car 30@ with_offset -1.9 -0.8 -2.1 
0503: create_actor_on_rope_with_pedtype 6 model #ARMY at 16@ 17@ 18@ handle_as 24@ 
077A: set_actor 20@ acquaintance 4 to_actors_pedtype 0 // see ped.dat 
060B: set_actor 20@ decision_maker_to 2 
Actor.SetImmunities(20@, 0, 0, 0, 1, 1)
077A: set_actor 21@ acquaintance 4 to_actors_pedtype 0 // see ped.dat 
060B: set_actor 21@ decision_maker_to 2 
Actor.SetImmunities(21@, 0, 0, 0, 1, 1)
077A: set_actor 23@ acquaintance 4 to_actors_pedtype 0 // see ped.dat 
060B: set_actor 23@ decision_maker_to 2 
Actor.SetImmunities(23@, 0, 0, 0, 1, 1)
077A: set_actor 24@ acquaintance 4 to_actors_pedtype 0 // see ped.dat 
060B: set_actor 24@ decision_maker_to 2 
Actor.SetImmunities(24@, 0, 0, 0, 1, 1)
32@ = 0 

:AIRU_427
wait 0 
if 
   not Actor.Dead(20@)
jf @AIRU_66E 
if 
   not Actor.Dead(21@)
jf @AIRU_66E 
if 
   not Actor.Dead(23@)
jf @AIRU_66E 
if 
   not Actor.Dead(24@)
jf @AIRU_66E 
0819: 16@ = actor $PLAYER_ACTOR distance_from_ground 
0819: 25@ = actor 20@ distance_from_ground 
0819: 26@ = actor 21@ distance_from_ground 
0819: 27@ = actor 23@ distance_from_ground 
0819: 28@ = actor 24@ distance_from_ground 
if and
0045:   25@ == 16@ // (float) 
0045:   26@ == 16@ // (float) 
0045:   27@ == 16@ // (float) 
0045:   28@ == 16@ // (float) 
jf @AIRU_4C5 
jump @AIRU_4D8 

:AIRU_4C5
if 
  32@ >= 5000 
jf @AIRU_427 

:AIRU_4D8
Car.LockInCurrentPosition(30@) = False
04C4: store_coords_to 16@ 17@ 18@ from_actor $PLAYER_ACTOR with_offset 0.0 -999.0 80.0 
04A2: set_heli 30@ fly_to 16@ 17@ 18@ altitude_between 80.0 and 80.0 
28@ = 0 
9@ = 2 

:AIRU_522
if 
  9@ == 2 
jf @AIRU_725 
if 
   not Actor.Dead(20@)
jf @AIRU_54B 
jump @AIRU_567 

:AIRU_54B
if 
056D:   actor 20@ defined 
jf @AIRU_567 
Actor.RemoveReferences(20@)
28@ += 1 

:AIRU_567
if 
   not Actor.Dead(21@)
jf @AIRU_57E 
jump @AIRU_59A 

:AIRU_57E
if 
056D:   actor 21@ defined 
jf @AIRU_59A 
Actor.RemoveReferences(21@)
28@ += 1 

:AIRU_59A
if 
   not Actor.Dead(23@)
jf @AIRU_5B1 
jump @AIRU_5CD 

:AIRU_5B1
if 
056D:   actor 23@ defined 
jf @AIRU_5CD 
Actor.RemoveReferences(23@)
28@ += 1 

:AIRU_5CD
if 
   not Actor.Dead(24@)
jf @AIRU_5E4 
jump @AIRU_600 

:AIRU_5E4
if 
056D:   actor 24@ defined 
jf @AIRU_600 
Actor.RemoveReferences(24@)
28@ += 1 

:AIRU_600
if 
   not Actor.Dead(29@)
jf @AIRU_617 
jump @AIRU_633 

:AIRU_617
if 
056D:   actor 29@ defined 
jf @AIRU_633 
Actor.RemoveReferences(29@)
28@ += 1 

:AIRU_633
if 
056E:   car 30@ defined 
jf @AIRU_70C 
if or
8202:   not actor $PLAYER_ACTOR near_car 30@ radius 200.0 200.0 sphere 0 
   Car.Wrecked(30@)
jf @AIRU_705 
9@ = 0 

:AIRU_66E
if 
   not Car.Wrecked(30@)
jf @AIRU_685 
Car.LockInCurrentPosition(30@) = False

:AIRU_685
if 
056E:   car 30@ defined 
jf @AIRU_69A 
Car.RemoveReferences(30@)

:AIRU_69A
if 
056D:   actor 20@ defined 
jf @AIRU_6AF 
Actor.RemoveReferences(20@)

:AIRU_6AF
if 
056D:   actor 21@ defined 
jf @AIRU_6C4 
Actor.RemoveReferences(21@)

:AIRU_6C4
if 
056D:   actor 23@ defined 
jf @AIRU_6D9 
Actor.RemoveReferences(23@)

:AIRU_6D9
if 
056D:   actor 24@ defined 
jf @AIRU_6EE 
Actor.RemoveReferences(24@)

:AIRU_6EE
if 
056D:   actor 29@ defined 
jf @AIRU_703 
Actor.RemoveReferences(29@)

:AIRU_703
end_thread 

:AIRU_705
jump @AIRU_725 

:AIRU_70C
if 
  28@ > 4 
jf @AIRU_725 
9@ = 0 

:AIRU_725
jump @AIRU_5D 

:AIRU_72C
if 
  31@ == 2 
jf @AIRU_FCE 

:AIRU_73E
wait 0 
if 
0AAB:   file_exists "MODELS\TXD\LD_BEAT.TXD" 
jf @AIRU_77D 
0390: load_txd_dictionary 'LD_BEAT' 
038F: load_texture "CRING" as 1 // Load dictionary with 0390 first 

:AIRU_77D
28@ = 0 
Model.Load(#PATRIOT)
Model.Load(#ARMY)
Model.Load(#MP5LNG)
038B: load_requested_models 

:AIRU_795
wait 0 
if 
   Player.Defined(0)
jf @AIRU_795 
09E8: $GYMFIGHT_INTERIOR = actor $PLAYER_ACTOR active_interior 
if 
  $GYMFIGHT_INTERIOR == 0 
jf @AIRU_FC0 
if 
  28@ == 0 
jf @AIRU_A33 
0208: 6@ = random_float_in_ranges 50.2 100.2 
0208: 7@ = random_float_in_ranges 50.2 100.2 
04C4: store_coords_to 0@ 1@ 2@ from_actor $PLAYER_ACTOR with_offset 6@ 7@ -1.0 
04D3: get_nearest_car_path_coords_from 0@ 1@ 2@  0 store_to 6@ 7@ 8@ 
3@ = Car.Create(#PATRIOT, 6@, 7@, 8@)
Car.Angle(3@) = 184.7214
Car.SetMaxSpeed(3@, 253.0)
Car.DoorStatus(3@) = 1
Car.Health(3@) = 20000
00AE: set_car 3@ traffic_behaviour_to 2 
Car.SetDriverBehaviour(3@, DriveToPlayer)
053F: set_car 3@ tires_vulnerability 0 
01EC: make_car 3@ very_heavy 1 
Car.SetImmunities(3@, 0, 1, 0, 1, 1)
0587: enable_car 3@ validate_position 0 
7@ = Actor.CreateAsDriver(Gang2, #ARMY, 3@)
8@ = Actor.CreateAsPassenger(Gang2, #ARMY, 3@, 0)
24@ = Actor.Create(Gang2, #ARMY, 6@, 7@, 8@)
Actor.SetImmunities(24@, 1, 1, 1, 1, 1)
Actor.Health(24@) = 1000
0619: enable_actor 24@ collision_detection 0 
27@ = Object.Create(2985, 0.0, 0.0, -25.0)
Object.CollisionDetection(27@) = False
0400: store_coords_to 0@ 1@ 2@ from_object 27@ with_offset 0.0 2.0 1.1 
Object.PutAt(27@, 0@, 1@, 2@)
0681: attach_object 27@ to_car 3@ with_offset 0.0 -1.0 0.5 rotation 0.0 0.0 0.0 
06A7: put_actor 24@ into_turret_on_car 3@ at_car_offset 0.0 -1.5 1.2 position 1 shooting_angle 100.0 360.0 with_weapon 0 
0638: AS_actor 24@ stay_put 1 
04F4: put_actor 24@ into_turret_on_object 27@ offset_from_object_origin -0.5 0.0 0.7 orientation 0 both_side_angle_limit 360.0 lock_weapon 0 
077A: set_actor 8@ acquaintance 4 to_actors_pedtype 0 // see ped.dat 
077A: set_actor 7@ acquaintance 4 to_actors_pedtype 0 // see ped.dat 
077C: clear_actor 24@ acquaintance 4 to_all_pedtypes // see ped.dat 
072F: enable_car 3@ stuck_check_distance 0.5 time 4000 and_restore_if stuck 1 flipped 1 unk_place_on_road_properly 1 to_path 7 // extended 03CC 
0190: add_car 3@ to_flipped_check // 6 max 
Car.SetDriverBehaviour(3@, DriveToPlayer)
if 
056D:   actor 7@ defined 
jf @AIRU_9F7 
if 
   not Actor.HasWeapon(7@, 29)
jf @AIRU_9F7 
Actor.GiveWeaponAndAmmo(7@, MP5, 999999)

:AIRU_9F7
if 
056D:   actor 8@ defined 
jf @AIRU_A25 
if 
   not Actor.HasWeapon(8@, 29)
jf @AIRU_A25 
Actor.GiveWeaponAndAmmo(8@, MP5, 999999)

:AIRU_A25
28@ = 1 
21@ = 1 

:AIRU_A33
if 
  28@ == 1 
jf @AIRU_FC0 
if 
056E:   car 3@ defined 
jf @AIRU_F3C 
if 
056D:   actor 24@ defined 
jf @AIRU_EA6 
0812: AS_actor 24@ perform_animation "DRIVE_R_SLOW" IFP "PED" framedelta 4.0 loopA 1 lockX 0 lockY 0 lockF 0 time 100 // versionB 
if 
01F4:   car 3@ flipped 
jf @AIRU_AA6 
Car.Angle(3@) = 0.0

:AIRU_AA6
if 
03CA:   object 27@ exists 
jf @AIRU_AC4 
Object.StorePos(27@, 26@, 25@, 23@)

:AIRU_AC4
gosub @AIRU_FCE 
if 
056D:   actor 31@ defined 
jf @AIRU_AF9 
if 
   not Actor.Dead(31@)
jf @AIRU_AF9 
Actor.StorePos(31@, 10@, 20@, 2@)

:AIRU_AF9
050A: 1@ = distance_between_XYZ 26@ 25@ 23@ and_XYZ 10@ 20@ 2@ 
0087: 13@ = 2@ // (float) 
0063: 13@ -= 23@ // (float) 
0073: 13@ /= 1@ // (float) 
0087: 14@ = 13@ // (float) 
0087: 30@ = 13@ // (float) 
006B: 13@ *= 14@ // (float) 
006B: 13@ *= 14@ // (float) 
13@ /= 6.0 
005B: 30@ += 13@ // (float) 
13@ *= 6.0 
006B: 13@ *= 14@ // (float) 
006B: 13@ *= 14@ // (float) 
13@ *= 0.075 
005B: 30@ += 13@ // (float) 
13@ /= 0.075 
006B: 13@ *= 14@ // (float) 
006B: 13@ *= 14@ // (float) 
13@ *= 0.0446 
005B: 30@ += 13@ // (float) 
30@ *= -57.296 
30@ += 350.0 
0063: 10@ -= 26@ // (float) 
0063: 20@ -= 25@ // (float) 
0604: get_Z_angle_for_point 10@ 20@ store_to 11@ 
12@ = Car.Angle(3@)
0063: 11@ -= 12@ // (float) 
11@ += 270.0 
02F6: 10@ = sine 11@ // (float) 
02F7: 20@ = cosine 11@ // (float) 
10@ *= -0.3 
20@ *= 0.4 
11@ -= 180.0 
if 
   not 30@ >= 320.0 
jf @AIRU_C48 
30@ = 320.0 

:AIRU_C48
if 
  30@ > 395.0 
jf @AIRU_C67 
30@ = 395.0 

:AIRU_C67
if and
0471:   actor 24@ near_object_in_rectangle 27@ radius 2.0 2.0 sphere 0 
03CA:   object 27@ exists 
jf @AIRU_EA6 
0087: 19@ = 30@ // (float) 
19@ += 10.0 
0681: attach_object 27@ to_car 3@ with_offset 0.0 -1.0 0.5 rotation 0.0 19@ 11@ 
11@ = Object.Angle(27@)
11@ -= 94.0 
Actor.Angle(24@) = 11@
0812: AS_actor 24@ perform_animation "DRIVE_R_SLOW" IFP "PED" framedelta 4.0 loopA 1 lockX 0 lockY 0 lockF 0 time 100 // versionB 
if 
  21@ == 2 
jf @AIRU_E11 
if 
056D:   actor 31@ defined 
jf @AIRU_E0A 
if 
   not Actor.Dead(31@)
jf @AIRU_DFC 
0393: actor 24@ perform_animation "DRIVE_R_SLOW" at 1.0 times_normal_rate 
0208: 5@ = random_float_in_ranges -1.0 1.0 
0208: 6@ = random_float_in_ranges -1.0 1.0 
0400: store_coords_to 26@ 25@ 18@ from_object 27@ with_offset 0.8 0.0 1.1 
04C4: store_coords_to 10@ 20@ 23@ from_actor 31@ with_offset 5@ 0.0 6@ 
06BC: create_M4_shoot_from 26@ 25@ 18@ target 10@ 20@ 23@ energy 100 
066E: create_particle "GUNFLASH" attached_to_object 27@ with_offset 0.8 0.0 1.1 rotation 0.866025 0 0.5000008 flag 1 store_to 0@ 
064C: make_particle 0@ visible 
064F: remove_references_to_particle 0@ 
097B: play_audio_at_object 27@ event 1157 
jump @AIRU_E03 

:AIRU_DFC
14@ = 0 

:AIRU_E03
jump @AIRU_E11 

:AIRU_E0A
14@ = 0 

:AIRU_E11
if 
  21@ == 1 
jf @AIRU_E4A 
if 
   not 9@ >= 50 
jf @AIRU_E43 
9@ += 1 
jump @AIRU_E4A 

:AIRU_E43
21@ = 2 

:AIRU_E4A
if 
  21@ == 2 
jf @AIRU_E8D 
0393: actor 24@ perform_animation "DRIVE_R_SLOW" at 0.0 times_normal_rate 
if 
  9@ > 0 
jf @AIRU_E8D 
9@ -= 1 

:AIRU_E8D
if 
  9@ == 1 
jf @AIRU_EA6 
21@ = 1 

:AIRU_EA6
if or
8202:   not actor $PLAYER_ACTOR near_car 3@ radius 200.0 200.0 sphere 0 
   Car.Wrecked(3@)
jf @AIRU_F3C 
28@ = 0 
if 
056E:   car 3@ defined 
jf @AIRU_EE6 
Car.RemoveReferences(3@)

:AIRU_EE6
if 
056D:   actor 7@ defined 
jf @AIRU_EFB 
Actor.RemoveReferences(7@)

:AIRU_EFB
if 
056D:   actor 8@ defined 
jf @AIRU_F10 
Actor.RemoveReferences(8@)

:AIRU_F10
if 
056D:   actor 24@ defined 
jf @AIRU_F25 
Actor.RemoveReferences(24@)

:AIRU_F25
if 
03CA:   object 27@ exists 
jf @AIRU_F3A 
Object.RemoveReferences(27@)

:AIRU_F3A
end_thread 

:AIRU_F3C
if 
   not Actor.Dead(8@)
jf @AIRU_F53 
jump @AIRU_F68 

:AIRU_F53
if 
056D:   actor 8@ defined 
jf @AIRU_F68 
Actor.RemoveReferences(8@)

:AIRU_F68
if 
   not Actor.Dead(7@)
jf @AIRU_F7F 
jump @AIRU_F94 

:AIRU_F7F
if 
056D:   actor 7@ defined 
jf @AIRU_F94 
Actor.RemoveReferences(7@)

:AIRU_F94
if 
   not Actor.Dead(24@)
jf @AIRU_FAB 
jump @AIRU_FC0 

:AIRU_FAB
if 
056D:   actor 24@ defined 
jf @AIRU_FC0 
Actor.RemoveReferences(24@)

:AIRU_FC0
jump @AIRU_795 
jump @AIRU_73E 

:AIRU_FCE
if 
  14@ == 0 
jf @AIRU_1076 
Actor.StorePos($PLAYER_ACTOR, 0@, 1@, 2@)
if 
0AE1: 31@ = random_actor_near_point 0@ 1@ 2@ in_radius 200.0 find_next 1 pass_deads 0 //IF and SET 
jf @AIRU_1076 
if 
   not 31@ == -1 
jf @AIRU_1076 
if 
056D:   actor 31@ defined 
jf @AIRU_1076 
089F: get_actor 31@ pedtype_to 13@ 
if and
   not 13@ == 8 
   not 13@ == 4 
   not 13@ == 5 
jf @AIRU_1068 
14@ = 1 
jump @AIRU_1076 

:AIRU_1068
31@ = -1 
14@ = 0 

:AIRU_1076
return 
end_thread 
18@ = 1 
0A9F: 19@ = current_thread_pointer 
0AB1: call_scm_func @AIRU_111F 2 19@ 0 14@  
0AB1: call_scm_func @AIRU_111F 2 19@ 3 15@  
0AB1: call_scm_func @AIRU_111F 2 19@ 6 16@  
0AB1: call_scm_func @AIRU_111F 2 19@ 9 17@  
0AB1: call_scm_func @AIRU_111F 2 19@ 12 18@  
0AA5: call 7392816 num_params 6 pop 6 18@ 18@ 17@ 16@ 15@ 14@  
0AB1: call_scm_func @AIRU_118B 2 3@ 4@ 3@ 4@  
0AB2: ret 2 3@ 4@ 

:AIRU_111F
if 
   not 0@ == 0 
jf @AIRU_117C 
1@ *= 4 
0A8E: 2@ = 0@ + 220 // int 
if 
  2@ == 1 
jf @AIRU_1166 
1@ += 10783072 
jump @AIRU_1175 

:AIRU_1166
005A: 1@ += 0@ // (int) 
1@ += 60 

:AIRU_1175
jump @AIRU_1183 

:AIRU_117C
1@ = 0 

:AIRU_1183
0AB2: ret 1 1@ 

:AIRU_118B
2@ = 640.0 
0A8D: 4@ = read_memory 12677188 size 4 virtual_protect 0 
0093: 4@ = integer 4@ to_float 
0073: 2@ /= 4@ // (float) 
006B: 0@ *= 2@ // (float) 
3@ = 448.0 
0A8D: 5@ = read_memory 12677192 size 4 virtual_protect 0 
0093: 5@ = integer 5@ to_float 
0073: 3@ /= 5@ // (float) 
006B: 1@ *= 3@ // (float) 
0AB2: ret 2 0@ 1@ 